package com.greydawn.ObserverPattern;

/**
 * @Author: zhongwr
 * @Create: 2021/12/6 21:46
 * @Version 1.0
 * @Description: 观察者 2号
 */
public class No2Observer extends Observer {

    public No2Observer(Subject subject) {
        this.subject = subject;
        this.subject.observerList.add(this);
    }

    @Override
    public void copyThat(String message) {
        System.out.println("No2 copy that message:" + message);
    }
}
